package edu.buffalo.cse.cse486_586.simpledht.entity;

import edu.buffalo.cse.cse486_586.util.AppUtil;

public class MyPackage {
	private int pkgType;
	private String content;

	public MyPackage() {
	}

	public MyPackage(int pkgType, String content) {
		super();
		this.pkgType = pkgType;
		this.content = content;
	}

	public int getPkgType() {
		return pkgType;
	}

	public void setPkgType(int pkgType) {
		this.pkgType = pkgType;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(pkgType);
		if (this.content.length() > 0)
			sb.append(AppUtil.DELIMITER).append(content);

		return sb.toString();
	}
}
